<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active tabs_index tabs_li"><a href="javascript:;">财务明细</a></li>
        <li class="tabs_add tabs_li"><a href="javascript:void(0)" onclick="add_sup_charge()">在线充值</a></li>
    </ul>
    <form class="js-ajax-form" action="" method="post" style="margin-top:50px;">
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="50" style="text-align: center;">ID</th>
                <th style="text-align: center;">会员(id)</th>
                <th style="text-align: center;">类型</th>
                <th width="250" style="text-align: center;">时间</th>
                <th style="text-align: center;">数量</th>
                <th style="text-align: center;">证书类型</th>
                <th width="300" style="text-align: center;">备注</th>
            </tr>
            </thead>
            <foreach name="download" item="vo">
                <tr>
                    <td align="center">{$key+1}</td>
                    <td align="center">{$vo.name}({$vo.uid})</td>
                    <td align="center">
                        <if condition="$vo['is_add'] eq 1">
                            <if condition="$vo['num'] gt 0">
                                <span style="color: #FF5722">收入</span>
                            <else/>
                                <span style="color: #5FB878">支出</span>
                            </if>
                        <else/>
                            <span style="color: #5FB878">支出</span>
                        </if>
                    </td>
                    <td align="center">{$vo['addtime'] |date="Y-m-d H:i:s",###} </td>
                    <td align="center">
                        <if condition="$vo['is_add'] eq 1">
                            <if condition="$vo['num'] gt 0">
                                <span style="color: #FF5722">+{$vo.num}</span>
                            <else/>
                                <span style="color: #5FB878">{$vo.num}</span>
                            </if>
                        <else/>
                            <span style="color: #5FB878">-{$vo.num}</span>
                        </if>                    
                    </td>
                    <td align="center"><if condition="$vo.type eq 1">公有<else/>私有</if></td>
                    <td align="center">{$vo['msg']}</td>
                </tr>
            </foreach>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
	function add_sup_charge(){
		$('.tabs_li').removeClass('active');
		$('.tabs_add').addClass('active');
		layer.open({
		  type: 2,
		  area: ['560px', '360px'],
		  fixed: false, //不固定
		  maxmin: true,
		  title:'在线充值',
		  content: "{:url('download/add_sup_charge')}",
		  end:function(){
			  $('.tabs_li').removeClass('active');
			  $('.tabs_index').addClass('active');
			  window.location.reload();
		  }
		});
	}
</script>
</body>
</html>